﻿<primitives:BorderlessWindow x:Class="Neurotoxin.Godspeed.Shell.Views.FtpTraceWindow"
                             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                             xmlns:primitives="clr-namespace:Neurotoxin.Godspeed.Shell.Primitives" 
                             xmlns:lex="http://wpflocalizeextension.codeplex.com"
                             xmlns:e="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
                             xmlns:b="clr-namespace:Neurotoxin.Godspeed.Shell.Views.Behaviors"
                             xmlns:inf="clr-namespace:Neurotoxin.Godspeed.Presentation.Infrastructure;assembly=Neurotoxin.Godspeed.Presentation"
                             lex:LocalizeDictionary.DesignCulture="en-US"
                             lex:ResxLocalizationProvider.DefaultAssembly="Neurotoxin.Godspeed.Shell"
                             lex:ResxLocalizationProvider.DefaultDictionary="Resources"
                             Width="640" Height="480" Title="{Binding Title}">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <TextBox Grid.Row="0" Text="{Binding Log}" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" FontFamily="Consolas">
            <e:Interaction.Behaviors>
                <b:TextBoxAutoScrollToBottomBehavior/>
            </e:Interaction.Behaviors>
        </TextBox>

        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,5,0,0">
            <Button Width="75" Content="{lex:LocText Close}" Margin="5" Command="{Binding CloseCommand}" />
        </StackPanel>
    </Grid>
    <e:Interaction.Triggers>
        <e:EventTrigger EventName="Closing">
            <inf:MapEventToCommand Command="{Binding ClosingCommand}" />
        </e:EventTrigger>
    </e:Interaction.Triggers>
</primitives:BorderlessWindow>